
#include <sys/cdefs.h>
#include "quad.h"
#include <arm/aeabi.h>

/*
 * Return -1, 0, 1 (like strcmp) if a [<, =, >] b
 */
int
__aeabi_ulcmp(unsigned long long a, unsigned long long b)
{
	const union uu aa = { .uq = a }, bb = { .uq = b }; 

	if (aa.ul[H] < bb.ul[H])
		return -1;
	if (aa.ul[H] > bb.ul[H])
		return 1;

	if (aa.ul[L] < bb.ul[L])
		return -1;
	if (aa.ul[L] > bb.ul[L])
		return 1;

	return 0;
}
